<html><head><title>component.html.Template</title><link rel="stylesheet" type="text/css" href="../../../styles/main.css"><link rel="stylesheet" type="text/css" href="../../../styles/prettify.css"><script language=JavaScript src="../../../javascript/prettify.js"></script><script language=JavaScript src="../../../javascript/main.js"></script></head><body class="FramedContentPage" onLoad="{NDOnLoad();prettyPrint();}"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.4 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="component.html.Template"></a>component.<wbr>html.<wbr>Template</h1><div class=CBody><p>extends <a href="Element-js.html#component.html.Element" class=LClass id=link5 onMouseOver="ShowTip(event, 'tt1', 'link5')" onMouseOut="HideTip('tt1')">component.html.Element</a></p><p>Component which can load given template at given path using &lt;utils.loader.Template&gt;</p><h4 class=CHeading>usage</h4><blockquote><pre class="prettyprint">var engine = new api.engine.BruteForce();
var template = new component.html.Template();
template.setWidth(&quot;50%&quot;);
template.setVerticalCenter(0);
template.setTemplatePath('./templates/header.tpl');
engine.addChild(template);
engine.start();</pre></blockquote><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#component.html.Template" >component.<wbr>html.<wbr>Template</a></td><td class=SDescription>extends <a href="Element-js.html#component.html.Element" class=LClass id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">component.html.Element</a></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#component.html.Template.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#component.html.Template.Template" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">Template</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#component.html.Template.setTemplatePath" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">setTemplatePath</a></td><td class=SDescription>loads given path synched and sets the parsed contents to this VE&rsquo;s data</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#component.html.Template.getTemplatePath" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">getTemplatePath</a></td><td class=SDescription>returns the last set path</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="component.html.Template.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="component.html.Template.Template"></a>Template</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>Template : function(</td><td class=PParameter nowrap>type,</td></tr><tr><td></td><td class=PParameter nowrap>domEventManagerName</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>params</h4><ul><li>type , the type of the base <a href="Element-js.html#component.html.Element" class=LClass id=link6 onMouseOver="ShowTip(event, 'tt1', 'link6')" onMouseOut="HideTip('tt1')">component.html.Element</a></li><li>domEventManagerName, the name of the global event manager used again in <a href="Element-js.html#component.html.Element" class=LClass id=link7 onMouseOver="ShowTip(event, 'tt1', 'link7')" onMouseOut="HideTip('tt1')">component.html.Element</a></li></ul></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="component.html.Template.setTemplatePath"></a>setTemplatePath</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>setTemplatePath : function(</td><td class=PParameter nowrap>templatePath</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>loads given path synched and sets the parsed contents to this VE&rsquo;s data</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="component.html.Template.getTemplatePath"></a>getTemplatePath</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>getTemplatePath : function()</td></tr></table></blockquote><p>returns the last set path</p></div></div></div>

</div><!--Content-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CClass>extends api.VisualElement</div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>Template : function(</td><td class=PParameter nowrap>type,</td></tr><tr><td></td><td class=PParameter nowrap>domEventManagerName</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>setTemplatePath : function(</td><td class=PParameter nowrap>templatePath</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>loads given path synched and sets the parsed contents to this VE&rsquo;s data</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>getTemplatePath : function()</td></tr></table></blockquote>returns the last set path</div></div><!--END_ND_TOOLTIPS-->

<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>